import {
  wxRequest
} from '@/common/wxRequest';

let env = "-test" //-dev 或者 -test
// const apiMall = 'http://192.168.2.105:9600/'
// const apiMall = 'http://47.103.211.25/'
// const apiMall = 'https://frontdev.xpandago.net/' // 控制台h5测试
const apiMall = 'https://front.xpandago.net/' // 控制台h5正式



//公众号接口路径前缀
// app/grass/ app/topic/  app/live/ app/discovery/  app/pointaward/营销组这些接口前缀要用apiMallOne  电商组其它前缀还是用apiMall2
// const apiMall2 = 'http://192.168.1.76:9600/'
// const apiMall2 = 'http://192.168.2.142:9600/' // 陈逸航
// const apiMall2 = 'https://appdev.xpandago.net/' // 公众号h5测试
const apiMall2 = 'https://app.xpandago.net/' // 公众号h5正式
// const apiMallOne = 'https://marketingapptest.xpandago.net/' //营销组测试
const apiMallOne = 'https://marketingapp.xpandago.net/' //营销组正式
// const apiMallData = 'https://bigdatatest.xpandago.net/' //数据测试
const apiMallData = 'https://bigdata.xpandago.net/' //数据正式
// const apiMallData = 'http://192.168.2.100:9600/' //任瑞
const httpImg = 'https://static.xpandago.net/'// 图片地址


// xpa登录接口 拿token用
const XPALogin = (params) => wxRequest(params, apiMall + '/app/console/user/login');
// 动态详情
const dynamicDetails = (params) => wxRequest(params, apiMall + '/app/console/news/newsDetails');
// 军校详情
const schoolDetails = (params) => wxRequest(params, apiMall + '/app/console/school/schoolDetails');
// 素材标签
const material = (params) => wxRequest(params, apiMall + 'app/console/material/tag/tags');
// 素材列表
const materialList = (params) => wxRequest(params, apiMall + 'app/console/material/materials');
// 素材收藏
const sourceCollect = (params) => wxRequest(params, apiMall + 'app/console/material/user/collect');
// 军校列表
const schoolList = (params) => wxRequest(params, apiMall + 'app/console/school/schoolList');
// 我的授权
const authorize = (params) => wxRequest(params, apiMall + 'app/console/my/authorize');
// 用户信息
const userMsg = (params) => wxRequest(params, apiMall + 'app/console/operate/user');
// 动态列表
const dynamicList = (params) => wxRequest(params, apiMall + 'app/console/news/newsList');
// 素材收藏列表
const userCollect = (params) => wxRequest(params, apiMall + 'app/console/material/userCollects');
// 下载素材项
const sourceDownload = (params) => wxRequest(params, apiMall + 'app/console/material/user/download')
// 删除收藏项
const deleteCollect = (params) => wxRequest(params, apiMall + 'app/console/material/user/deleteCollect');
// 获取任务完成情况
const getTasksWithdrawal = (params) => wxRequest(params, apiMall + 'app/console/bambook/getTasksWithdrawal');
// 首页待办事务数
const agendaNum = (params) => wxRequest(params, apiMall + 'app/console/agenda/agendaNum');

//公众号接口地址
//登录
const login = (params) => wxRequest(params, apiMall2 + 'app/member/login/register/login');
//授权登录code换取token
const loginCode = (params) => wxRequest(params, apiMall2 + 'app/wegzh/code');
//我的粉丝
const myFans = (params) => wxRequest(params, apiMall2 + 'app/userteam/list');
//我的团队	
const myGroup = (params) => wxRequest(params, apiMall2 + 'app/userteam/newDirectlyList');
//资金明细头部
const listTop = (params) => wxRequest(params, apiMall2 + 'app/member/user/userdetail/detailByUser');
//营销账户数据
const marketingmsg = (params) => wxRequest(params, apiMall2 + 'app/member/user/userdetail/marketingmsg');
//转入营销账户
const tomarketing = (params) => wxRequest(params, apiMall2 + 'app/member/user/userdetail/tomarketing');
//转出营销账户
const outmarketing = (params) => wxRequest(params, apiMall2 + 'app/member/user/userdetail/outmarketing');
//资金明细列表
const newList = (params) => wxRequest(params, apiMall2 + 'app/member/user/userdetail/newList');
//团队业绩
const performance = (params) => wxRequest(params, apiMall2 + 'app/finance/teamresults/results/teamDetial');
//团队业绩头部
const ratioList = (params) => wxRequest(params, apiMall2 + 'app/finance/teamresults/results/ratioList');
//团队业绩详情
const perforInfo = (params) => wxRequest(params, apiMall2 + 'app/finance/teamresults/results/teamGoods');
// 业绩排行榜
const perforList = (params) => wxRequest(params, apiMall2 + 'app/finance/teamresults/results/teamUser');
//上传身份证
const gzhUploadCard = (params) => wxRequest(params, apiMall2 + 'app/member/address/address/gzhUploadCard');
//时间接口
const typeList = (params) => wxRequest(params, apiMall2 + 'app/goodsdetail/ratio/ratiouserprice/typeList');
//c查看上级二维码
const getParentWeChatCode = (params) => wxRequest(params,apiMall2 +'app/member/member/member/getParentWeChatCode')
//团建补助列表
const allowanceList = (params) => wxRequest(params, apiMall2 + 'app/member/allowance/list');
//团建补助详情
const allowanceInfo = (params) => wxRequest(params, apiMall2 + 'app/member/allowance/info');
//团建补助添加
const allowancePreserve = (params) => wxRequest(params, apiMall2 + 'app/member/allowance/preserve');
//活动规则
const searchByType = (params) => wxRequest(params,apiMall2 +'app/activityrules/xcxSearchByType')
//oss
const getPolicy = (params) => wxRequest(params,apiMall2 +'app/common/aliyunsts/getPolicy')
//粉丝详情
const getInviteUserPerformance = (params) => wxRequest(params,apiMall2 +'app/finance/commission/teamearning/getInviteUserPerformance')
//国家号与列表
const checkoutphoneList = (params) => wxRequest(params,apiMall2 +'app/member/login/checkoutphone/listNew')
// const checkoutphoneList = (params) => wxRequest(params,apiMall2 +'app/member/login/checkoutphone/list')
//个人业绩详情
const teamOwn = (params) => wxRequest(params,apiMall2 +'app/finance/teamresults/results/teamOwn')
//我的粉丝粉丝数据
const getFansForMonth = (params) => wxRequest(params,apiMall2 +'app/userteam/getFansForMonth')
//获取粉丝详情
const getFansDetail = (params) => wxRequest(params,apiMall2 +'app/userteam/getFansDetail')
//激励中心列表
const giftsale = (params) => wxRequest(params,apiMall2 +'app/giftsale/list')
const giftsaleOne = (params) => wxRequest(params,apiMall +'app/common/advertising/list')
// 订单明细列表
const orderDetailsList = (params) => wxRequest(params,apiMall2 +'app/order/order/order/orderDetailsList')
// 订单明细详细
const queryOrderInfo = (params) => wxRequest(params,apiMall2 +'app/order/order/order/queryOrderInfo')
// 激励中心规则
const getRuleById = (params) => wxRequest(params,apiMall2 +'app/giftsale/getRuleById')
// 激励中心详情
const giftDetail = (params) => wxRequest(params,apiMall2 +'app/giftsale/giftDetailForWx')
// 小程序码生成订单数据
const saveOrderDeatail = (params) => wxRequest(params, apiMall2 + 'app/goods/goodsDetail/share/saveOrderDeatail')

// 活跃人数-统计
const activityNum = (params) => wxRequest(params,apiMallData +'app/xpa/query/activity/num')
// 活跃人数-趋势
const activityTrend = (params) => wxRequest(params,apiMallData +'app/xpa/query/activity/trend')
// 团队规模-统计
const teamNum = (params) => wxRequest(params,apiMallData +'app/xpa/query/team/num')
// 团队规模-趋势
const teamTrend = (params) => wxRequest(params,apiMallData +'app/xpa/query/team/trend')
// 今日交易-统计
const tradeNum = (params) => wxRequest(params,apiMallData +'app/xpa/query/trade/num')
// 今日交易-趋势
const tradeTrend = (params) => wxRequest(params,apiMallData +'app/xpa/query/trade/trend')
// 数据首页-统计
const informationNum = (params) => wxRequest(params,apiMallData +'app/xpa/query/data/num')
// 数据首页-趋势
const informationTrend = (params) => wxRequest(params,apiMallData +'app/xpa/query/data/trend')
// 用户 收益&业绩
const earningsteam = (params) => wxRequest(params,apiMall2 +'app/member/user/userdetail/earningsteam')
// 数据首页 实时收益
const earningsnow = (params) => wxRequest(params,apiMall2 +'app/member/user/userdetail/earningsnow')
// 查看物流包裹列表
const messsageList = (params) => wxRequest(params, apiMall2 + 'app/order/logistics/deliverydoc/messsageList')
// 获取最新的物流轨迹
const messsageLastInfo = (params) => wxRequest(params, apiMall2 + 'app/order/logistics/deliverydoc/messsageLastInfo')
// 获取物流信息
const messsageInfo = (params) => wxRequest(params, apiMall2 + 'app/order/logistics/deliverydoc/messsageInfo')
// XPG团队奖管理
const teambreed = (params) => wxRequest(params, apiMall2 + 'app/finance/teambreed/detial')
// 申领团队经营奖
const apply = (params) => wxRequest(params, apiMall2 + 'app/finance/teambreed/apply')
// 品牌销售排行榜
const brandRanking = (params) => wxRequest(params, apiMallData + 'app/xpa/query/2632')
// 查询商品浏览记录
const viewLogOther = (params) => wxRequest(params, apiMall2 + 'app/goods/goodsDetail/goods/viewLogOther')
//获取微信签名
const getSignature = (params) => wxRequest(params, apiMall2 + 'app/goods/goodsDetail/share/getSignature')
// 事项是否已读
const readed = (params) => wxRequest(params, apiMall + 'app/console/agenda/readed')
// 营销组
//是否已经领取过任务积分
const checkGetPoint = (params) => wxRequest(params, apiMallOne + 'app/grass/grasscommon/checkGetPoint')
//完成任务领积分
const finishTask = (params) => wxRequest(params, apiMallOne + 'app/grass/grasscommon/finishTask')
// 数据新增首页
const newDataIndex = (params) => wxRequest(params, apiMallData + 'app/xpa/data/index')
// 数据详情
const newDataDetail = (params) => wxRequest(params, apiMallData+ '/app/xpa/data/detail')
// 品牌
const newDataBrand= (params) => wxRequest(params, apiMallData+ '/app/xpa/data/brand')
// 完成竹叶任务，参数决定是否完成分享素材任务
const sureTask = (params) => wxRequest(params, apiMall+ 'app/console/bambook/sureTask')
// 标记竹叶任务，日常任务需要先标记以后才能完成
const markTask = (params) => wxRequest(params, apiMall+ 'app/console/bambook/markTask')


export default {
	dynamicDetails,
	schoolDetails,
	apiMall,
	apiMall2,
	apiMallOne,
	apiMallData,
	httpImg,
	XPALogin,
  login,
  loginCode,
  myFans,
  material,
  materialList,
  sourceCollect,
  schoolList,
  authorize,
  dynamicList,
  userCollect,
  userMsg,
  sourceDownload,
  deleteCollect,
  myGroup,
  listTop,
  marketingmsg,
  tomarketing,
  outmarketing,
  newList,
  performance,
  perforInfo,
  gzhUploadCard,
  typeList,
  getParentWeChatCode,
  perforList,
  allowanceList,
  allowanceInfo,
  allowancePreserve,
  searchByType,
  getPolicy,
  getInviteUserPerformance,
  checkoutphoneList,
  ratioList,
  teamOwn,
  getFansForMonth,
  getFansDetail,
  giftsale,
  giftsaleOne,
  orderDetailsList,
  queryOrderInfo,
  getRuleById,
  giftDetail,
  saveOrderDeatail,
  activityNum,
  activityTrend,
  teamNum,
  teamTrend,
  tradeNum,
  tradeTrend,
  informationNum,
  informationTrend,
  earningsteam,
  earningsnow,
  messsageList,
  messsageLastInfo,
  messsageInfo,
  teambreed,
  getTasksWithdrawal,
  agendaNum,
  apply,
  brandRanking,
  viewLogOther,
  getSignature,
  readed,
  checkGetPoint,
  finishTask,
  newDataIndex,
  newDataDetail,
  newDataBrand,
  markTask,
  sureTask
}

